﻿using System;

namespace Elkomp {

	public partial class Form2 : FormaEdit {

		public Form2()
			: base() {
			InitializeComponent();
		}

		public Form2( int selectedId )
			: base() {
			InitializeComponent();
		}

		private void btnOk_Click( object sender, EventArgs e ) {
			if ( FormIsEdit ) {
				save_Edit();
			} else {
				save_Insert();
			}
		}

		public override void save_Edit() {
			if ( validacija() ) {
				base.save_Edit();
			}
		}

		public override void save_Insert() {
			if ( validacija() ) {
				base.save_Insert();
			}
		}
	}
}